package ar.com.gestion.listeners;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JMenuItem;

import ar.com.gestion.constantes.Constantes;
import ar.com.gestion.vistas.FormAgregar;

public class MenuAgregarActionListener implements ActionListener {

	@Override
	public void actionPerformed(ActionEvent e) {
		
		
		JMenuItem boton = (JMenuItem) e.getSource();
		
		if (boton.getText().equals("Producto")){
			new FormAgregar(Constantes.AGREGAR_PRODUCTO, new AgregarProductoListener());
		}
		if (boton.getText().equals("Cliente")){
					new FormAgregar(Constantes.CLIENTE, new AgregarClienteListener());
			
			
		}
		

	}

}
